﻿@model Dal.Entities.Doc3
@{
    Layout = null;
    ViewBag.Title = "Edit1";
    ViewBag.Nav = 2;
    ViewBag.Menu = 3;
    ViewBag.PassAudit = (Model == null ? false : Model.StatusAudit == 1 ? true : false);
    ViewBag.HasQuestion = Web.Controllers.Common.HasQuestion((int)ViewBag.DocID, 2);
    int ti = 0;
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>病历录入</title>
    @Html.Partial("meta")
</head>
<body id="b_main">
    @Html.Partial("header")
    <!--/end #header-->
    <div id="wrapper">
        <!--holds pretty much everything-->
        @Html.Partial("menu")
        <!--/end #menu_main-->
        <div id="content">
            @Html.Partial("nav")
            @using (Html.BeginForm("edit3", "doc", FormMethod.Post, new { @class = "broom_form", id = "form1", style = "margin-left: 30px;" }))
            {
                @Html.HiddenFor(i => i.DocID)
                if (ViewBag.Result != null)
                {
                    if (ViewBag.Result == true)
                    {
                <div class="notification confirm">
                    <em>
                        <img src="/assets/img/icons/tick_circle.png" alt="" />操作成功 </em>
                </div>
                    }
                }

                <table cellspacing="0" summary="table" class="broom_tablenobg broom_table" width="90%">
                    <tbody>
                        <tr class="odd">
                            <td>
                                1
                            </td>
                            <td>
                                <span style="font-weight: bold">随访日期 (默认当前日期) </span><span style="color: Red">*</span>
                            </td>
                            <td>
                                <div class="rili">
                                    @Html.TextBox("VisitDateDoc3", Model != null && Model.VisitDateDoc3.HasValue ? Model.VisitDateDoc3.Value.ToString("yyyy-MM-dd") : DateTime.Now.ToString("yyyy-MM-dd"), new { @class = "inputbox date-pick", @readonly = "readonly" })
                                </div>
                            </td>
                            <td>
                                @Html.Raw(Web.Controllers.Common.GetQuestionDesc((int)ViewBag.DocID, "VisitDate", 3, "随访日期"))
                            </td>
                        </tr>
                        <tr class="even">
                            <td>
                                2
                            </td>
                            <td>
                                <span>艾司西酞普兰目前剂量 </span><span style="color: Red">*</span>
                            </td>
                            <td>
                                @Html.RadioButtonFor(i => i.DoseDoc3, "10 mg", new { onclick = "hide('divrdDoseOther')" })
                                10 mg
                                <br />
                                @Html.RadioButtonFor(i => i.DoseDoc3, "20 mg", new { onclick = "hide('divrdDoseOther')" })
                                20 mg
                                <br />
                                @Html.RadioButtonFor(i => i.DoseDoc3, "其他", new { id = "rdDoseOther", onclick = "show('divrdDoseOther')" })
                                其他
                                <div id="divrdDoseOther" style="padding-left: 30px">
                                    请填写： @Html.TextBoxFor(i => i.AdditionDoseOtherDoc3)
                                </div>
                                <script type="text/javascript">
                                    associate('rdDoseOther', 'divrdDoseOther');
                                </script>
                            </td>
                            <td>
                                @Html.Raw(Web.Controllers.Common.GetQuestionDesc((int)ViewBag.DocID, "Dose", 3, "艾司西酞普兰目前剂量"))
                            </td>
                        </tr>
                        <tr class="odd">
                            <td>
                                3
                            </td>
                            <td colspan="3">
                                <span>目前患者的自我评价： </span><span style="color: Red">*</span>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                PHQ9 自评量表
                                <br />
                                <br />
                                <table style="border: 1px solid">
                                    <tr>
                                        <td>
                                            过去2周内，您是否被以下问题困扰？
                                        </td>
                                        <td width="50">
                                            完全没有(0)
                                        </td>
                                        <td width="50">
                                            有时(1)
                                        </td>
                                        <td width="50">
                                            超过一半时间(2)
                                        </td>
                                        <td width="50">
                                            几乎每天(3)
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            兴趣或快感降低
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C1Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C1Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C1Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C1Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            感到沮丧、情绪低落、失望无助
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C2Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C2Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C2Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C2Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            入睡困难、早醒或睡眠过多
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C3Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C3Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C3Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C3Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            感到疲倦或精力不足
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C4Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C4Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C4Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C4Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            食欲减退或增加
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C5Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C5Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C5Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C5Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            无价值感，认为自己失败
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C6Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C6Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C6Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C6Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            注意力集中困难，比如不能集中注意力读报纸或看电视
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C7Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C7Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C7Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C7Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            你是否每天说话或动作明显比过去缓慢 或者感到烦躁、坐卧不安、难以静坐?
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C8Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C8Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C8Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C8Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            认为伤害自己或死去会让自己感觉更好，或者有反复自杀或伤害自己的行为
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C9Doc3, 0, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C9Doc3, 1, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C9Doc3, 2, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                        <td>
                                            @Html.RadioButtonFor(i => i.PHQ9C9Doc3, 3, new { onclick = "setPHQ9Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            总分
                                        </td>
                                        <td colspan="4">
                                            @Html.TextBoxFor(i => i.PHQ9C10Doc3, new { @readonly = "readonly", @class = "inputbox" })
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                评分：0-4：正常 5-9：轻度 10-14：中度 15-19：中重度 >19:重度
                                <script type="text/javascript">
                                    function setPHQ9Doc3() {
                                        var score = 0;
                                        for (var i = 1; i < 10; i++) {
                                            if ($('input[type=radio][id="PHQ9C' + i + 'Doc3"]:checked').length == 1) {
                                                score += parseInt($('input[type=radio][id="PHQ9C' + i + 'Doc3"]:checked').val());
                                            }
                                        }
                                        $("#PHQ9C10Doc3").val(score);
                                    }
                                </script>
                            </td>
                            <td>
                                @Html.Raw(Web.Controllers.Common.GetQuestionDesc((int)ViewBag.DocID, "PHQ9", 3, "PHQ9 自评量表"))
                            </td>
                        </tr>
                        <tr class="odd">
                            <td colspan="4">
                                <span>Remit-5量表：在过去的2周 </span><span style="color: Red">*</span>
                            </td>
                        </tr>
                        <tr class="even">
                            <td colspan="3">
                                <table style="border: 1px solid">
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                        </td>
                                        <td width="70">
                                            从来没有(4)
                                        </td>
                                        <td width="70">
                                            极少时候(3)
                                        </td>
                                        <td width="70">
                                            有时候(2)
                                        </td>
                                        <td width="70">
                                            经常(1)
                                        </td>
                                        <td width="70">
                                            一直都是(0)
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            你觉得愉快吗？
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C1Doc3, 4, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C1Doc3, 3, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C1Doc3, 2, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C1Doc3, 1, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C1Doc3, 0, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            你觉得满足吗？
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C2Doc3, 4, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C2Doc3, 3, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C2Doc3, 2, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C2Doc3, 1, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C2Doc3, 0, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            你可以控制自己的情绪吗？
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C3Doc3, 4, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C3Doc3, 3, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C3Doc3, 2, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C3Doc3, 1, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C3Doc3, 0, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            当事情变糟时，你能控制自己吗？
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C4Doc3, 4, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C4Doc3, 3, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C4Doc3, 2, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C4Doc3, 1, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C4Doc3, 0, new { onclick = "setRemit5Doc3()" })
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            你觉得前途渺茫吗？
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C5Doc3, 0, new { onclick = "setRemit5Doc3()" }) (0)
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C5Doc3, 1, new { onclick = "setRemit5Doc3()" }) (1)
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C5Doc3, 2, new { onclick = "setRemit5Doc3()" }) (2)
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C5Doc3, 3, new { onclick = "setRemit5Doc3()" }) (3)
                                        </td>
                                        <td width="70">
                                            @Html.RadioButtonFor(i => i.Remit5C5Doc3, 4, new { onclick = "setRemit5Doc3()" }) (4)
                                        </td>
                                    </tr>
                                    <tr class="@((ti++) % 2 == 0 ? "odd" : "even")">
                                        <td>
                                            总分
                                        </td>
                                        <td colspan="5">
                                            @Html.TextBoxFor(i => i.Remit5C6Doc3, new { @readonly = "readonly", @class = "inputbox" })
                                        </td>
                                    </tr>
                                </table>
                                <br />
                                <script type="text/javascript">
                                    function setRemit5Doc3() {
                                        var score = 0;
                                        for (var i = 1; i < 6; i++) {
                                            if ($('input[type=radio][id="Remit5C' + i + 'Doc3"]:checked').length == 1) {
                                                score += parseInt($('input[type=radio][id="Remit5C' + i + 'Doc3"]:checked').val());
                                            }
                                        }
                                        $("#Remit5C6Doc3").val(score);
                                    }
                                </script>
                            </td>
                            <td>
                                @Html.Raw(Web.Controllers.Common.GetQuestionDesc((int)ViewBag.DocID, "Remit5", 3, "Remit5量表"))
                            </td>
                        </tr>
                        <tr class="odd">
                            <td>
                                4
                            </td>
                            <td>
                                <span>建议 </span><span style="color: Red">*</span>
                            </td>
                            <td>
                                @Html.RadioButtonFor(i => i.SuggestDoc3, "增加日剂量", new { onclick = "show('divrdSuggestAdd');hide('divrdSuggestReduce');hide('divrdSuggestOther')", id = "rdSuggestAdd" })
                                增加日剂量<br />
                                <div id="divrdSuggestAdd" style="padding-left: 30px">
                                    @Html.RadioButtonFor(i => i.AdditionSuggestAddDoc3, "5 mg") 5 mg<br />
                                    @Html.RadioButtonFor(i => i.AdditionSuggestAddDoc3, "10 mg") 10 mg
                                </div>
                                @Html.RadioButtonFor(i => i.SuggestDoc3, "减少日剂量", new { onclick = "show('divrdSuggestReduce');hide('divrdSuggestAdd');hide('divrdSuggestOther')", id = "rdSuggestReduce" })
                                减少日剂量<br />
                                <div id="divrdSuggestReduce" style="padding-left: 30px">
                                    @Html.RadioButtonFor(i => i.AdditionSuggestReduceDoc3, "5 mg") 5 mg<br />
                                    @Html.RadioButtonFor(i => i.AdditionSuggestReduceDoc3, "10 mg") 10 mg
                                </div>
                                @Html.RadioButtonFor(i => i.SuggestDoc3, "维持现状", new { onclick = "hide('divrdSuggestAdd');hide('divrdSuggestReduce');hide('divrdSuggestOther')" })
                                维持现状<br />
                                @Html.RadioButtonFor(i => i.SuggestDoc3, " 其他", new { onclick = "show('divrdSuggestOther');hide('divrdSuggestReduce');hide('divrdSuggestAdd')", id = "rdSuggestOther" })
                                其他<br />
                                <div id="divrdSuggestOther" style="padding-left: 30px">
                                    请填写： @Html.TextBoxFor(i => i.AdditionSuggestOtherDoc3)
                                </div>
                                <script type="text/javascript">
                                    associate('rdSuggestAdd', 'divrdSuggestAdd');
                                    associate('rdSuggestReduce', 'divrdSuggestReduce');
                                    associate('rdSuggestOther', 'divrdSuggestOther');
                                </script>
                            </td>
                            <td>
                                @Html.Raw(Web.Controllers.Common.GetQuestionDesc((int)ViewBag.DocID, "Suggest", 3, "建议"))
                            </td>
                        </tr>
                    </tbody>
                </table>
                @Html.Partial("savebutton")
            }
            <!--/end .tabber-->
        </div>
    </div>
    <div class="clear">
    </div>
    @Html.Partial("questionScript")
    @if ((ViewBag.Status == "edit" || ViewBag.Status == "") && ViewBag.PassAudit == false)
    {
        <script type="text/javascript">
            $(document).ready(function () {
                $("#form1").validate({
                    rules: {
                        VisitDateDoc3: "required",
                        DoseDoc3: "required",
                        PHQ9C10Doc3: "required",
                        Remit5C6Doc3: "required",
                        SuggestDoc3: "required"
                    }
                })
            });
        </script>
    }
</body>
</html>
